// Package routers @APIVersion 1.0.0
// @Title beego Test API
// @Description beego has a very cool tools to autogenerate documents for your API
// @Contact astaxie@gmail.com
// @TermsOfServiceUrl http://beego.me/
// @License Apache 2.0
// @LicenseUrl http://www.apache.org/licenses/LICENSE-2.0.html
package routers

import (
	"photo_credit/controllers"

	"github.com/beego/beego/v2/server/web"
)

func init() {
	// UserController
	web.Router("/user/login", &controllers.UserController{}, "post:Login")
	web.Router("/user/logout", &controllers.UserController{}, "get:Logout")
	web.Router("/user/uploadIdentityCard", &controllers.UserController{}, "post:UploadIdentityCard")

	//web.Router("/user/getSession", &controllers.UserController{}, "get:GetSessionValue")
	//web.Router("/user/login", &controllers.UserController{}, "get:LoginView")

	// ContentController
	web.Router("/content/uploadImage", &controllers.ContentController{}, "post:UploadImage")
	web.Router("/content/content-list", &controllers.ContentController{}, "get:ContentList")
	web.Router("/content/update-price", &controllers.ContentController{}, "get:UpdatePrice")
	web.Router("/content/allList", &controllers.ContentController{}, "get:GetAllContent")
	web.Router("/content/buy", &controllers.ContentController{}, "get:BuyContent")

	// PageController 页面跳转
	web.Router("/", &controllers.PageController{}, "get:Index")
	web.Router("/page/login", &controllers.PageController{}, "get:Login")
	web.Router("/page/register", &controllers.PageController{}, "get:Register")
	web.Router("/page/imageAuthor", &controllers.PageController{}, "get:ImageAuthor")
	web.Router("/page/userSFZAuthor", &controllers.PageController{}, "get:UserSFZAuthor")
	web.Router("/page/agreement", &controllers.PageController{}, "get:Agreement")
}
